/*
 * Copyright (C) 2017 WordPlat Open Source Project
 *
 *      https://wordplat.com/InteractiveKLineView/
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.wordplat.ikvstockchart.entry;

/**
 * <p>股票测试数据</p>
 * <p>Date: 2017/3/2</p>
 *
 * @author afon
 * @since 2021-05-09
 */
public class StockDataTest {
    /**
     * KLINE
     */
    public static final String KLINE = "15.6|15.6|15.6|15.6|1|2015/10/10,17.16|17.16|17.16|17.16|1|2015/10/11,18.88|18.88|18.88|18.88|1|2015/10/12,20.77|20.77|20.77|20.77|1|2015/10/13,22.85|22.85|22.85|22.85|1|2015/10/14,25.14|25.14|25.14|25.14|1|2015/10/15,27.65|27.65|27.65|27.65|1|2015/10/16,30.42|30.42|30.42|30.42|1|2015/10/17,33.46|33.46|33.46|33.46|1|2015/10/18,36.81|36.81|36.81|36.81|31|2015/10/19,40.49|40.49|40.49|40.49|42|2015/10/20,44.54|44.54|44.54|44.54|4|2015/10/21,48.99|48.99|48.99|48.99|2|2015/10/22,53.89|53.89|53.89|53.89|2|2015/10/23,59.28|59.28|59.28|59.28|2|2015/10/24,65.21|65.21|65.21|65.21|29|2015/10/25,71.73|71.73|71.73|71.73|192|2015/10/26,78.9|78.9|78.9|78.9|100|2015/10/27,86.79|86.79|86.79|86.79|74|2015/10/28,95.47|95.47|95.47|95.47|48|2015/10/29,105.02|105.02|105.02|105.02|90|2015/10/30,115.52|115.52|115.52|115.52|99|2015/10/31,127.07|127.07|127.07|127.07|38|2015/11/1,139.78|139.78|139.78|139.78|39|2015/11/2,153.76|153.76|153.76|153.76|615|2015/11/3,169.14|169.14|169.14|169.14|35|2015/11/4,186.05|186.05|186.05|186.05|66330|2015/11/5,204.66|204.66|175.0|204.66|4339|2015/11/6,186.05|186.05|184.19|184.19|750|2015/11/9,165.77|165.77|165.77|165.77|378|2015/11/10,149.19|165.77|149.19|150.7|9940|2015/11/11,137.0|149.0|135.63|135.63|1764|2015/11/12,122.07|139.0|122.07|135.49|4834|2015/11/13,138.0|139.0|121.94|121.94|2193|2015/11/14,129.96|134.13|110.1|134.13|21002|2015/11/16,134.8|147.54|134.8|147.54|321|2015/11/17,161.99|162.29|147.01|162.29|30087|2015/11/18,178.0|178.52|146.06|174.02|44307|2015/11/19,157.45|191.42|157.45|191.42|33700|2015/11/20,210.5|210.56|210.5|210.56|234|2015/11/21,210.48|231.62|210.48|231.62|1015|2015/11/23,254.78|254.78|254.78|254.78|758|2015/11/24,280.26|280.26|230.0|280.26|36243|2015/11/25,308.29|308.29|253.23|289.67|93637|2015/11/27,265.0|290.5|264.0|289.0|35870|2015/11/28,266.0|306.0|265.0|274.27|17528|2015/11/29,258.0|301.7|252.0|301.7|7754|2015/11/30,331.87|331.87|279.0|331.87|9287|2015/12/1,365.06|365.06|340.0|365.06|1233|2015/12/2,401.57|401.57|401.57|401.57|18|2015/12/6,441.73|441.73|441.73|441.73|23|2015/12/7,485.9|485.9|485.9|485.9|89|2015/12/8,501.0|528.0|501.0|525.01|15909|2015/12/9,500.0|539.0|500.0|536.39|15616|2015/12/10,510.0|548.0|510.0|544.92|17517|2015/12/11,521.0|537.0|490.43|490.43|10533|2015/12/12,516.0|518.0|441.39|441.39|2359|2015/12/14,400.0|446.0|397.25|445.0|7275|2015/12/15,415.0|431.0|414.0|426.85|5851|2015/12/16,426.0|446.0|426.0|441.9|6047|2015/12/17,431.0|447.0|431.0|443.6|6594|2015/12/18,443.0|459.0|438.0|445.26|6284|2015/12/19,444.0|453.0|439.0|444.8|6322|2015/12/21,445.0|469.0|437.0|463.33|9732|2015/12/22,463.0|478.0|457.0|464.88|9967|2015/12/23,462.0|482.0|462.0|480.55|8664|2015/12/24,479.0|501.0|478.0|491.92|12688|2015/12/25,491.0|498.0|442.73|442.97|26530|2015/12/26,460.0|460.0|398.67|398.67|128|2015/12/28,399.0|438.0|358.8|411.79|24309|2015/12/29,410.0|428.0|370.61|397.29|10939|2015/12/30,397.0|437.02|359.01|435.59|10678|2015/12/31,430.0|479.15|429.01|479.0|8944|2016/1/4,489.99|500.0|432.8|440.05|8979|2016/1/5,441.0|460.0|400.0|435.0|8162|2016/1/6,430.0|440.0|418.0|435.78|7358|2016/1/7,440.0|479.36|437.0|479.36|4628|2016/1/8,480.0|527.3|476.0|527.3|3381|2016/1/9,540.0|580.03|512.0|580.03|1961|2016/1/11,570.0|638.03|570.0|638.03|363|2016/1/12,638.0|701.83|638.0|701.83|198|2016/1/13,772.01|772.01|772.01|772.01|130|2016/1/14,849.21|849.21|849.21|849.21|92|2016/1/15,934.13|934.13|934.12|934.13|659|2016/1/16,1027.54|1027.54|1026.0|1027.46|5332|2016/1/18,1129.0|1130.21|1129.0|1130.21|2743|2016/1/19,1243.23|1243.23|1017.19|1243.23|4401|2016/1/20,1367.55|1367.55|1200.0|1367.55|715|2016/1/21,1290.0|1504.31|1230.79|1504.31|2421|2016/1/22,1370.0|1581.69|1360.0|1427.06|4391|2016/1/23,1284.35|1569.0|1284.35|1293.25|4222|2016/1/25,1200.0|1422.58|1163.92|1419.99|10552|2016/1/26,1278.0|1450.0|1277.99|1277.99|2478|2016/1/27,1150.19|1150.19|1150.19|1150.19|24|2016/1/28,1035.17|1265.21|1035.17|1265.21|597|2016/1/29,1155.0|1155.0|1148.0|1148.31|204|2016/1/30,1159.0|1166.0|1043.0|1166.0|34|2016/2/1,1088.01|1282.0|1088.01|1160.0|7|2016/2/2,1050.0|1276.0|1050.0|1276.0|8|2016/2/3,1403.0|1403.0|1180.1|1180.1|121|2016/2/4,1290.0|1290.0|1290.0|1290.0|1|2016/2/5,1419.0|1419.0|1419.0|1419.0|3|2016/2/15,1560.9|1560.9|1560.9|1560.9|6|2016/2/16,1716.99|1716.99|1716.99|1716.99|1|2016/2/17,1888.69|1888.69|1730.0|1888.69|2489|2016/2/18,2077.56|2077.56|1888.9|2077.5|179|2016/2/19,2285.25|2285.25|2285.25|2285.25|2|2016/2/20,2513.78|2513.78|2513.78|2513.78|1|2016/2/22,2765.16|2765.16|2262.4|2681.24|11969|2016/2/23,2940.0|2949.36|2796.0|2949.36|2594|2016/2/24,3200.0|3244.3|2654.42|3244.3|18336|2016/2/25,3568.73|3568.73|3568.73|3568.73|1|2016/2/26,3300.01|3925.6|3300.0|3925.6|211|2016/2/27,4318.16|4318.16|4318.16|4318.16|2|2016/2/29,4749.98|4749.98|4749.98|4749.98|2|2016/3/1,5224.98|5224.98|4380.0|5222.83|2847|2016/3/2,5000.0|5745.11|5000.0|5560.93|6699|2016/3/3,5200.0|5500.0|5200.0|5247.02|2588|2016/3/4,4999.0|5700.0|4865.0|5100.0|1304|2016/3/5,4800.0|5610.0|4590.0|4993.67|5186|2016/3/7,4725.0|5031.0|4720.0|4974.43|4277|2016/3/8,4680.0|5253.0|4660.0|4937.77|2812|2016/3/9,4690.0|5431.55|4678.0|5431.55|704|2016/3/10,5974.71|5974.71|5974.71|5974.71|19|2016/3/11,6572.18|6572.18|6572.18|6572.18|1|2016/3/12,5914.96|7229.4|5914.96|7229.4|2|2016/3/14,7952.34|7952.34|7952.34|7952.34|51|2016/3/15,8747.57|8747.57|8747.57|8747.57|1|2016/3/16,9622.33|9622.33|9073.0|9180.0|10797|2016/3/17,8262.0|9599.0|8262.0|9060.0|12696|2016/3/18,8154.0|9966.0|8154.0|9966.0|1523|2016/3/19,8969.4|10962.6|8969.4|10962.6|7800|2016/3/21,10000.0|12058.86|9866.34|12058.86|22749|2016/3/22,11000.0|11000.09|10852.97|10852.97|7554|2016/3/23,9767.67|9767.67|9767.67|9767.67|9760|2016/3/24,8790.9|10744.44|8790.9|10744.44|21621|2016/3/25,9673.92|11818.88|9673.92|11818.88|8981|2016/3/26,13000.77|13000.77|13000.77|13000.77|8898|2016/3/28,11700.69|14300.85|11700.69|14300.85|8591|2016/3/29,12880.7|15730.94|12880.7|15730.94|989|2016/3/30,14300.0|16000.0|14157.85|14157.85|8555|2016/3/31,12742.06|14999.0|12742.06|12742.06|8451|2016/4/1,11467.85|12742.06|11467.85|11467.85|7638|2016/4/2,12614.64|12614.64|12600.0|12614.64|9282|2016/4/5,13876.0|13876.1|13876.0|13876.1|6155|2016/4/6,15263.71|15263.71|13877.0|15263.71|7010|2016/4/8,15265.0|16790.08|15263.1|16790.0|1686|2016/4/9,18469.0|18469.0|16791.0|18469.0|6263|2016/4/11,20314.99|20314.99|17140.0|17140.0|9121|2016/4/12,18854.0|18854.0|15426.0|15426.0|6350|2016/4/13,16968.0|16968.0|13883.4|16190.0|5811|2016/4/14,16200.0|16870.0|16200.0|16475.0|6172|2016/4/15,16480.0|16500.0|16480.0|16499.0|1482|2016/4/16,16505.0|16560.0|16350.0|16534.49|17921|2016/4/18,16540.0|16585.0|16000.0|16585.0|12586|2016/4/19,16590.0|17750.0|14926.6|16100.0|6813|2016/4/20,16150.0|16500.0|15900.0|15900.0|6288|2016/4/21,15000.0|15109.0|14310.0|14310.0|847|2016/4/22,14311.0|14311.0|12879.0|12879.0|1711|2016/4/23,11591.1|11591.1|11591.1|11591.1|2|2016/4/25,10431.99|10431.99|10431.99|10431.99|2|2016/4/26,9388.79|9388.79|9388.79|9388.79|227|2016/4/27,10089.0|10327.67|8449.91|10327.67|29609|2016/4/28,9510.0|11200.0|9294.9|9294.9|11540|2016/4/29,8365.41|8365.41|8365.41|8365.41|5362|2016/4/30,7528.87|7528.87|7528.87|7528.87|4|2016/5/3,6775.98|6775.98|6775.98|6775.98|1|2016/5/4,6098.38|7453.58|6098.38|7453.58|13|2016/5/5,6708.32|7221.0|6708.22|6708.22|169|2016/5/6,6666.0|6901.34|6037.4|6888.0|1515|2016/5/7,7499.88|7576.8|6200.0|7576.8|118919|2016/5/9,7500.0|8334.48|7500.0|8334.48|98763|2016/5/10,9167.93|9167.93|7501.03|7501.03|93618|2016/5/11,7425.0|7425.0|6750.93|6750.93|8956|2016/5/12,6682.0|6740.0|6075.84|6690.41|10877|2016/5/13,6700.0|6760.0|6700.0|6760.0|10144|2016/5/14,6800.0|7436.0|6732.0|7436.0|13706|2016/5/16,7441.0|8179.6|7441.0|8179.6|6733|2016/5/17,8015.0|8997.56|8014.0|8995.0|9218|2016/5/18,8815.0|9894.5|8815.0|9893.0|3589|2016/5/19,9898.0|10882.3|9898.0|10874.0|390|2016/5/20,10880.0|11961.4|10877.0|11961.0|824|2016/5/21,11965.0|13157.1|11962.0|13157.0|269|2016/5/23,13025.0|14472.7|13000.0|14472.7|590|2016/5/24,15919.97|15919.97|15919.96|15919.96|2|2016/5/25,17510.99|17510.99|17510.99|17510.99|1|2016/5/26";
    /**
     * TIME_LINE
     */
    public static final String TIME_LINE = "";

    /**
     * parseKLineData
     *
     * @param data
     * @return EntrySet
     */
    public static EntrySet parseKLineData(String data) {
        final EntrySet entrySet = new EntrySet();

        final String[] candleDatas = data.split(",");

        for (String candleData : candleDatas) {
            String[] v = candleData.split("[|]");

            float open = Float.parseFloat(v[0]);
            float high = Float.parseFloat(v[1]);
            float low = Float.parseFloat(v[2]);
            float close = Float.parseFloat(v[3]);

            int volume = Integer.parseInt(v[4]);

            entrySet.addEntry(new Entry(open, high, low, close, volume, v[5]));
        }

        return entrySet;
    }

    /**
     * parseTimeLine
     *
     * @param data data
     * @return EntrySet
     */
    public static EntrySet parseTimeLine(String data) {
        final EntrySet entrySet = new EntrySet();

        return entrySet;
    }
}
